<?php

namespace App\Http\Controllers\Home;

use Illuminate\Http\Request;
use App\Http\Controllers\Controller;
use App\Model\Score;

class HomeController extends Controller
{
    /**
     * Create a new controller instance.
     *
     * @return void
     */
    public function __construct()
    {
        //$this->middleware('auth');
    }

    /**
     * Show the application dashboard.
     *
     * @return \Illuminate\Http\Response
     */
    public function search(Request $request)
    {	
		$data['code']=0;
		$data['data']=Score::where('姓名',$request->username)->where('考号',$request->no)->first();
		$data['error']="";
		$data['msg']="success";
		$data['timestamp']=time();
		return $data;
    }
}
